 @import "../_vars.scss";

.Question-wrapper {
  position: relative;
  display: none;

  &.is-visible {
    display: block;
  }
}

.Question {
  position: relative;
  background: white;
  padding: 8% 5%;
  border-radius: 12px;
  box-shadow: 0 0.4rem 0.8rem -0.1rem rgba(0, 32, 128, 0.1), 0 0 0 1px #f0f2f7;
  line-height: 1.8;
  font-size: 18px;
  margin-bottom: 20px;
  overflow: hidden;

  @media (min-width: $breakpoint-md) {
    padding: 40px;
  }

  &:last-child {
    margin-bottom: 32px;
  }

  &__heading {
    h2 {
      margin-top: 0;
      line-height: 1.3;
      font-size: 22px;

      @media (min-width: $breakpoint-md) {
        font-size: 24px;
      }
    }
  }

  &__answer {
    display: none;

    &.is-open {
      display: block;
    }

    > p:last-child {
      margin-bottom: 0;
    }

    h4 {
      margin-bottom: 0;
    }

    h5 {
      margin-bottom: -10px;
      margin-top: 20px;
      font-size: 20px;
    }

    ul {
      margin-top: 5px;
      padding-left: 25px;
      list-style-type: disc;

      p {
        margin: 0;
      }
    }

    blockquote {
      margin: 0;
      margin-top: 15px;
      border-left: 2px solid #5ac983;
      background: transparentize(#43a065, 0.95);
      color: #43a065;
      padding: 10px 0;
      font-weight: 500;
      font-size: 90%;

      > p {
        padding-left: 15px;
        margin: 0;
      }
    }
  }

  &__button {
    width: 180px;
  }

  &__button-icon {
    &.is-rotated {
      .btn__icon {
        transform: rotateX(180deg);
      }
    }
  }

  &__badge {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -7px;
    padding: 5px 10px;
    border-radius: 30px;
    line-height: 1;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: bold;
    background: white;
    color: #8385aa;
    line-height: 1;
    outline: 0;
    border-top: 1px solid darken(#f0f2f7, 4%);
    z-index: 1;
  }

  &__tag {
    position: absolute;
    top: 0;
    right: -65px;
    transform: rotate(45deg);
    color: white;
    width: 125px;
    height: 40px;
    background: #333;

    &.is-html {
      background: $gradient-html;
    }

    &.is-css {
      background: $gradient-css;
    }

    &.is-javascript {
      background: $gradient-javascript;
    }

    &.is-node {
      background: $gradient-node;
    }
  }
}
